import "amfe-flexible/index.js"
import Vue from 'vue'
import axios from 'axios'
import Vant from 'vant'
import 'vant/lib/index.css'
import Item from '@/components/item.vue';
Vue.filter("farmat",function(val){
    if(val.length>6){
        val = val.slice(0,6)+"..."
    }
    return val
})
Vue.filter("time",function(val){
    if(val){
        var min = Math.floor((val/1000/60))
        if(min<10){
            min= "0"+min
        }
        var seconds = Math.floor(val/1000%60)
        if(seconds<10){
            seconds = "0"+seconds
        }
        val = min +":"+seconds
    }
    return val
})
Vue.use(Vant)
axios.defaults.baseURL = 'http://192.168.14.49:5000/'; 
Vue.prototype.axios = axios;
Vue.component('Item',Item)
export default Vue;